// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import Character from "../../BASE/Character";
import GeZiManager from "../../Manager/GeZiManager";
import MessageCenter from "../../Message/MessageCenter";
import DXX from "./DXX";




const {ccclass, property} = cc._decorator;

@ccclass
export default class D12 extends DXX {

    target:Character=null;
    TheNumber:string = 'D12';
    Cname:string="猎牙"


    start () {
        this.target=this.node.getComponent(Character);
        this.target.shop2.push(this)
        this.target.kill3.push(this)
    }
 
Shop2(A: string, s: boolean): void {
    this.target.weapon.CJ+=1
    console.log(this.target.weapon.CJ)
}

Kill3(n: number): void {
   if (this.target.getc(n).tt=="human") {
    MessageCenter.MakeSHMessage("AM",[this.target.ZB],1,this.target.Pturn,"TNS")
    MessageCenter.MakeSHMessage("AM",[this.target.ZB],2,this.target.Pturn,"Qi+")
   } 
}
remove(): void {
  GeZiManager.shanchu(this.target.shop2,this)
  GeZiManager.shanchu(this.target.kill3,this)
    this.target.weapon.CJ-=1
}
}